﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using DarcRogue;

namespace TileEditor
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Array a = Enum.GetValues(typeof(ConsoleColor));
            foreach (ConsoleColor c in a)
                comboBox1.Items.Add(c);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            SaveFileDialog sf = new SaveFileDialog();
            sf.AddExtension = true;
            sf.DefaultExt = "dtl";
            DialogResult dr = sf.ShowDialog();
            if (dr == DialogResult.OK || dr == DialogResult.Yes)
            {
                Tile t = new Tile(textBox1.Text[0], GetColor(), textBox3.Text, checkBox1.Checked, textBox2.Text);
                t.Save(sf.FileName);
            }
        }

        ConsoleColor GetColor()
        {
            ConsoleColor c = (ConsoleColor)comboBox1.SelectedItem;
            return c;
        }
    }
}
